package Command;

public class RemoteControl {
    private Command[] onCommands = new Command[5];
    private Command[] offCommands = new Command[5];
    public void setCommand(int slot, Command onCommand, Command offCommand) {
        onCommands[slot] = onCommand;
        offCommands[slot] = offCommand;
    }
    public void on(int slot) {
        onCommands[slot].execute();
    }
    public void off(int slot) {
        offCommands[slot].execute();
    }
}
